<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<body>
<div th:fragment="menu">
    <div class="ui pointing menu webmenu">
        <img src="/static/webicon.png"/>
        <a class="active item" href="/">首页</a>
        <a class="item" href="/admin" th:if="${currUser} and ${currUser.userType} and ${currUser.userType.hasAdminAuth()}">管理模式</a>
        <a class="item" href="/edit" th:if="${currUser} and ${currUser.userType} and ${currUser.userType.hasEditAuth()}">投稿</a>
        <!--<a class="item">Messages</a>-->
        <!--<a class="item">Friends</a>-->
        <div class="right menu">
            <div class="item">
                <div class="ui transparent icon input">
                    <input type="text" placeholder="搜索" />
                    <i class="search link icon"></i>
                </div>
            </div>
            <a class="item" th:if="${currUser}" th:text="${currUser.username}" id="userItem"></a>
            <a class="item" href="/signout" th:if="${currUser}">注销</a>
        </div>
    </div>
    <div th:replace="userInfo :: info"></div>
</div>


</body>

</html>